package tbdp.tool.spi;

import java.util.Iterator;
import java.util.List;

/**
 * @author xbkaishui
 * @version $Id: ListRecordIterator.java, v 0.1 2017-06-24 下午2:42 xbkaishui Exp $$
 */
public class ListRecordIterator<T> implements RecordIterator {

    public List<T> data;
    public Iterator<T> iterator;

    public ListRecordIterator(List<T> data) {
        this.data = data;
        iterator = data.iterator();
    }

    @Override
    public boolean hasNext() {
        return iterator.hasNext();
    }

    @Override
    public T next() {
        return iterator.next();
    }
}
